package com.qyl.honghengshop.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.qyl.honghengshop.dto.Goods;
import com.qyl.honghengshop.utils.PageBean;


public interface GoodsMapper {

	//根据商品获得数据记录数
	int getRecordCount(Goods goods);

	//根据条件
	List<Goods> shopList(@Param("pageBean")PageBean pageBean, @Param("goods")Goods goods);

	int saveShop(Goods goods);

	int delShop(Integer id);

	Goods getShopById(Integer id);

	int updateShop(Goods goods);
	
	Goods getGoodsByGoodId(Integer goods_id);

	List<Goods> getAllShop();

	//把外键置空
	void updateTypeCodeToNull(String code);

	//获得热门商品
	List<Goods> getGoodsListIsHot();

	List<Goods> getGoodsByCode(String code);

}
